home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
A-Monthly Disks
/
(c)aas.d64
/
tax87
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
11KB
|
368 lines
0 REM V 1.0 JAN 26/88
1 DATA === ONTARIO TAX RETURN ===,$1987
2 DATA .......JIM BUTTERFIELD....,C0;0
3 DATA ====PAGE 1====,C0
4 DATA INCOME FROM EMPLOYMENT,#1;I2
5 DATA EMPLOYMENT EXPENSES,#2;C1;V1%20[500
6 DATA NET EMPL EARN,Z2;C2;V1-V2
7 DATA DIVDS TAX CANDN CORPNS,#3;I2
8 DATA INTEREST (CANADIAN),#4;I2
9 DATA TAXABLE CAPITAL GAINS,I2
10 DATA OTHER INCOME,I2
11 DATA TOTAL INCOME,#5;C3;S2
12 DATA ====PAGE 2====,C0
13 DATA TOTAL INCOME,C4;V5
14 DATA CPP CONTRIBUTIONS,Z3;I3
15 DATA UIC CONTRIBUTIONS,I3
16 DATA OTHER DEDUCTIONS,I3
17 DATA TOTAL DEDUCTIONS,#6;C4;S3
18 DATA NET INCOME,#7;C4;V5-V6
19 DATA PERSONAL EXEMPTION,Z3;C3;4220
20 DATA AGE EXEMPTION,I3[2640
21 DATA EXEMPTION FOR SPOUSE,I3[3700
22 DATA EXEMPTION FOR CHILDREN,I3
23 DATA OTHER EXEMPTIONS,I3
24 DATA TOTAL PERSONAL EXEMPTIONS,#8;C4;S3
25 DATA LINE 236,#9;C4;V7-V8
26 DATA INTRST & DIVDND DEDUCTION,C3;Z3;V3+V4[1000
27 DATA MEDICAL EXPENSES,#10;I2
28 DATA LESS 3% NI,#11;0;(V10>0);C2;V7%3]0
29 DATA NET MEDICAL EXPENSES,0;(V10>0);C3;V10-V11]0
30 DATA CHARITABLE DONATIONS,I3
31 DATA OTHER DEDUCTIONS,I3
32 DATA TOTAL DEDUCTIONS,#13;C4;S3
33 DATA TAXABLE INCOME,#14;C4;V9-V13]0
35 DATA USE TAX TABLE/OR..,(V14<=40000);(V3=0);C0
36 DATA ====SCHEDULE 1=====,C0
37 DATA BRCKT,#15;V14;X;63347;36952;23755;18476;13197;7918;5279;2639;1320;0
38 DATA ..ON FIRST,V15;C1
39 DATA ..TAX IS,#16;C2;Y;15705;7786;4487;3273; 2217;1214; 739; 290; 79;0
40 DATA ..ON REMAINING,#17;C1;V14-V15
41 DATA ..TAX AT PERCENT..,#18;C1;Y;34;30;25;23;20;19;18;17;16;6
42 DATA ..GIVES,#19;C2;V17%V18
43 DATA TOTAL,#20;C3;V16+V19
44 DATA DIVD TAX CREDIT,#21;C3;V3%50/3[V20
45 DATA BASIC FEDERAL TAX,#22;C4;V20-V21
46 DATA FORGN TAX DEDUCTIONS,#23;I3
47 DATA FED TAX PAYABLE,#24;C4;V22-V23
51 DATA NDIV SURTAX PAYABLE,#28;C4;V22%3
52 DATA ===ONTARIO TAX===,0
53 DATA BASIC ONTARIO TAX,#30;C3;V22%50
54 DATA ONTARIO SURTAX,#31;C3;V30-5000]0%3
55 DATA ADJUSTED TAX,#32;C4;V30+V31
58 DATA TAX REDUCTION,#35;C3;V32;(V14>2075);2275-V14/2]0
59 DATA ONTARIO TAX PAYABLE,#36;C4;V32-V35
60 DATA ==ONTARIO TAX CREDITS==,C0
61 DATA ARE YOU ELIGIBLE FOR THESE,#37;N
62 DATA XXN,(V37=0);J48
63 DATA RENTAL PAYMENTS,#38;I1
64 DATA 20% OF RENTAL,#39;C2;V38%20
65 DATA PROP TAXES/COLLEGE,#40;I2
66 DATA OCCUPANCY COST,#41;C2;V39+V40
67 DATA ADD..,#42;C3;V41[230
68 DATA TO..,#43;C3;V41%10
69 DATA TOTAL PROP TAX CREDIT,#44;C4;V42+V43
70 DATA SALES TAX CREDIT,#45;C4;V8%1
71 DATA TOTAL (A),#46;C4;V44+V45
72 DATA LESS 2% TI (B),#47;C4;V14%2;(V14<=2075);0
73 DATA NET P&ST CREDITS(D),#48;C4;V46-V47]0[500*V37
74 DATA ONT POLIT TAX CREDIT,#49;I4
75 DATA ONTARIO TAX CREDITS,#50;C4;V48+V49
76 DATA ===PAGE 4===,C0
77 DATA FEDERAL TAX PAYABLE,C4;V24
78 DATA FEDERAL TAX CREDITS,#51;I3
79 DATA NET FEDERAL TAX,#52;C4;V24-V51
80 DATA INDIV SURTAX PAYABLE,C4;V28
81 DATA NET FED TAX PAYABLE,#53;C4;V52+V28
82 DATA ONTARIO TAX PAYABLE,#54;C3;V36
83 DATA TOTAL PAYABLE,#55;C4;V53+V54
84 DATA TAX DEDUCTED PER SLIPS,#56;I3
85 DATA ONTARIO TAX CREDITS,C3;V50
86 DATA OTHER CREDITS,#57;I3
87 DATA TOTAL CREDITS,#58;C4;V56+V50+V57
88 DATA X,#59;V55-V58;(V58>V55);V58-V55
89 DATA X,$;----------
90 DATA * NO BALANCE *,#60;1;(V59<1);C0;0
91 DATA X,#61;V60;(V58>V55);2*V60
92 DATA * REFUND DUE *,(V61=2);C2;V59
93 DATA * BALANCE PAYABLE *,(V61=1);C2;V59
999 DATA END,END,END
1000 REM: **** R U G - REPORT UTILITY GENERATOR ****
1010 REM: COMMAND LINES... ( C$(.) )
1020 REM: A SERIES OF COMMANDS, EACH OF WHICH IS SEPARATED
1030 REM: BY A SEMICOLON;
1035 REM: LINE STARTING WITH # IDENTIFIES VARIABLE LINE.
1040 REM: LINE STARTING WITH $ IS SPECIAL TITLING LINE.
1050 REM: COMMANDS...
1060 REM: MAY BE AN EXPRESSION (SEE BELOW), OR:
1070 REM: C# - PRINT IN COLUMN (#=0 TO 4, 0=NO PRINT)
1080 REM: Z# - CLEAR COLUMN TOTAL (#=1 TO 4)
1090 REM: T# - PRINT COLUMN TOTAL (#=1 TO 4)
1100 REM: (Z OR T MAY HAVE MULTIPLES, E.G., Z1234)
1105 REM: J# - JUMP TO SPECIFIED LINE
1110 REM: EXPRESSIONS...
1111 REM: (PARENTHESES FOR TEST) .. CONTINUE LINE IF TRUE (<>0)
1112 REM: FOLLOWING MAY BE MIXED USING OPERATORS (BELOW)
1113 REM: NUMERIC VALUES;
1114 REM: I# FOR KEYBOARD INPUT (# IS COLUMN);
1115 REM: S# FOR COLUMN TOTAL (# IS COLUMN);
1116 REM: V# FOR VARIABLE VALUE;
1117 REM: N GETS YES/NO VALUE
1118 REM: OPERATORS (LEFT-TO-RIGHT EVALUATION):
1120 REM: + ADDITION - SUBTRACTION
1130 REM: * MULTIPLY / DIVIDE
1140 REM: % PERCENTAGE (MULTIPLY)
1150 REM: [ SMALLER OF ] GREATER OF
1160 REM: (EXAMPLE: 22[7 RETURNS 7)
1170 REM: > < = COMPARISONS: YIELD 0 (NOT TRUE) OR 1 (TRUE)
1180 REM: COMPARISONS MAY BE USED MULTIPLY, E.G., V5<=100
1190 REM: EXAMPLES...
1200 REM: I3+100[500
1210 REM: INPUT VALUE, ADD 100, IF OVER 500 SET TO 500
1220 REM: PRINT RESULT IN COLUMN3
1230 REM: C3;V12%10[100
1240 REM: TAKE 10% OF VALUE 12 (LINE 12) MINIMUM 100
1250 REM: AND PRINT IN COLUMN 3
1260 REM: 500;(V15>1000);V15/2
1270 REM: VALUE 500; OR IF VALUE 15 IS GREATER THAN 1000
1280 REM: SET VALUE V15/2. DO NOT PRINT (NO 'C' SET).
2000 PRINT "PLEASE WAIT..."
2010 PRINT
2020 PRINT "WHEN PROMPTED, YOU MAY ENTER:"
2030 PRINT " <RETURN> (FOR 'ZERO' INPUT);"
2040 PRINT " NUMERIC VALUE <RETURN>;"
2050 PRINT " NUMERIC VALUE + "
2060 PRINT " (TO HAVE ITEMS TOTALLED);
2070 [153] " _ (TO REVIEW OR CHANGE DATE)."
2080 [153]
2100 [153] "ONTARIO 1987 INCOME TAX"
2110 [153]
2120 [153] "THIS PROGRAM DOES NOT GIVE TAX ADVICE"
2130 [153] " ..JUST HELPS WITH THE ARITHMETIC."
2140 [153]
2150 [153] "THIS IS *NOT* THE COMPUTER TAX FORMAT"
2160 [153] "ACCEPTED FOR FILING BY REVENUE CANADA."
2170 [153]
3000 [134] I$(200),I%(200),V(200),C$(200),C(4),T(4)
3010 C(1)[178]1:C(2)[178]2:C(3)[178]4:C(4)[178]8
3020 [129] J[178]1 [164] 100
3030 [135] I$,C$:[139] I$[178]"END" [137] 3060
3040 L0[178]1:[139] [200](C$,1)[179][177]"#" [137] 3050
3041 [129] L0[178]2 [164] [195](C$):[139] [202](C$,L0,1)[179][177]";"[167] [130] L0
3042 T[178][197]([202](C$,2,L0[171]1)):[139] I%(T)[179][177]0 [137] 5260
3043 I%(T)[178]J:L0[178]L0[170]1
3050 I$(J)[178]I$:C$(J)[178][202](C$,L0):[130] J
3060 [153]
3070 [153] "CMD";:J[178][185](0):[153]
3080 LL[178]J[170]1
3090 [159] 4,3
4000 S$[178]" "
4010 C1[178]1
5000 [143] NEXT ITEM
5010 C0[178][171]1:T3[178]0:C[178]C1:C1[178]C[170]1:[139] C$(C)[178]"C0" [167] C9[178]C
5040 L0[178]1:L1[178][195](C$(C)):I0[178]0:[139]L1[178]0[137]5420 :[143] END
5045 [139] [198](C$(C))[178]36 [167] [141] 7810:[137] 5000 :[143] $
5050 [143] START NEW SCAN
5060 [139] L0[177]L1 [137] 5400
5070 [129] J[178]L0 [164] L1
5080 [139] [198]([202](C$(C),J))[179][177]59 [167] [130] J:[143] SEMICOLON
5090 L2[178]J:L3[178]L2[171]L0
5100 T[178][198]([202](C$(C),L0))
5110 [139] T[178]67 [137] 5270: [143] C
5115 [139] I2 [175] T[178]73 [137] 5270: [143] I/PRINT
5120 [139] T[178]40 [137] 5180: [143] (
5125 [139] T[178]74 [137] 5262: [143] J
5128 [139] I2 [137] 5350
5130 [139] T[178]88 [137] 5216: [143] X
5132 [139] T[178]89 [137] 5232: [143] Y
5140 [139] T[178]84 [176] T[178]90 [137] 5280: [143] T/Z
5150 [141]8010
5155 [139]T0[175][168]I0[167]L8[178]L0:L9[178]L2:[141]6010:[139] X$[178]"_" [137] 5440
5156 [139] [168] T0 [137] 5170 :[143] ERROR
5160 V(C)[178][181](V[172]100[170].5):[137]5350
5170 [153] "ERROR ITEM";C;"' ";[202](C$(C),L0);" '":[144]
5175 [143]: (..) EVALUATE AND CONTINUE/QUIT
5180 E[178][198]([202](C$(C),L2[171]1))[179][177]41:[139] E [137] 5260
5190 E[178](L2[171]L0)[179]3:[139] E [137] 5260
5200 L8[178]L0[170]1:L9[178]L2[171]1:[141] 6010:[139] V[178]0 [137] 5400
5210 [137]5350
5215 [143] X - TABLE LOOKUP
5216 Y[178]0:V0[178]V(C)[173]100
5217 L0[178]L2[170]1:[139] L0[177]L1 [137] 5226
5218 Y[178]Y[170]1:[129] J[178]L0 [164] L1
5219 [139] [198]([202](C$(C),J))[179][177]59 [167] [130] J:[143] SEMICOLON
5220 L2[178]J:L3[178]L2[171]L0
5222 V[178][197]([202](C$(C),L0,L3))
5224 [139] V[177]V0 [137] 5217
5226 V(C)[178][181](V[172]100[170].5)
5228 [137] 5400
5230 [143] Y - TABLE USAGE
5232 Y1[178]Y
5234 L0[178]L2[170]1:[139] L0[177]L1 [137] 5248
5236 Y1[178]Y1[171]1:L0[178]L2[170]1:[129] J[178]L0 [164] L1
5238 [139] [198]([202](C$(C),J))[179][177]59 [167] [130] J:[143] SEMICOLON
5240 L2[178]J:L3[178]L2[171]L0
5242 [139] Y1[177]0 [137] 5234
5246 V(C)[178][181]([197]([202](C$(C),L0,L3))[172]100[170].5)
5248 [137] 5400
5260 [153] "ERROR ITEM";C;"' ";[202](C$(C),L1);" '":[144]
5261 [143]: J - JUMP TO LINE
5262 V[178][197]([202](C$(C),L0[170]1,L3[171]1))
5263 C1[178]I%(V)
5264 [137] 5400
5265 [143]: C - SET COLUMN VALUE
5270 C0[178][197]([202](C$(C),L0[170]1,L3[171]1)):E[178](C0[177]4):[139] E [137] 5260
5271 C0[178]C(C0)
5272 [137] 5350
5275 [143]: T/Z MULTIPLE COLUMN FUNCTIONS
5280 C8[178]C0:C0[178]0
5290 [129] J[178]L0[170]1 [164] L2[171]1
5300 T0[178][197]([202](C$(C),J,1)):C0[178]C0[176]C(T0)
5310 [130] J
5320 [139] T[178]90 [167] [141] 5800:C0[178]C8
5330 [139] T[178]84 [167] T3[178]1
5340 [143]: PROCEED TO NEXT COMMAND WITHIN LINE
5350 L0[178]L2[170]1:[137] 5060
5400 [143]: WINDUP LINE HERE
5410 [141] 7010:[137] 5000
5415 [143]: END OF CONTROL STRINGS
5420 [139] I2 [167] [160]4:[128]
5422 [139] C9[178]0 [137] 5540
5425 [133] "WANT TO REVISE THIS";X$
5430 [139] X$[179][177]"Y" [175] X$[179][177]"YES" [137] 5540
5440 X$[178]"":[139] C9[178]0 [137] 5530
5445 [153]:R[178]0:[129] J[178]1 [164] C
5450 [139] C$(J)[178]"C0" [167] R[178]R[170]1:[153] R;">>> ";I$(J)
5460 [130] J
5465 V[178]1:[139] R[178]1 [137] 5490
5470 [153] "GO BACK TO WHICH ONE (1 TO";R;")";
5480 [133] V
5490 [139] V[179]1 [176] V[177]R [137] 5530
5500 R[178]0:[129] J[178]1 [164] C
5510 [139] C$(J)[178]"C0" [167] R[178]R[170]1:[139] R[178]V [167] C[178]J
5520 [130] J
5530 C1[178]C:[137] 5000
5540 [160] 4:[133] "WANT A PRINTOUT";X$
5550 [139] X$[179][177]"Y" [175] X$[179][177]"YES" [167] [128]
5560 C1[178]1:[159] 4,4:LL[178]80:I0[178]0:I2[178][171]1
5570 [137] 5000
5800 [143]: ZERO COLUMN TOTALS
5810 [129] J[178]1 [164] 4
5820 [139] (C0 [175] C(J))[179][177]0 [167] T(J)[178]0
5830 [130] J
5840 [142]
6000 [143] EVALUATE
6010 V[178]0:O0[178]43
6020 [143] GET A COMMAND
6030 [129] J[178]L8 [164] L9[171]1
6040 T[178][198]([202](C$(C),J)):[141] 8025
6050 [139] [168] T0 [167] [130] J
6060 O1[178]T:L5[178]J
6070 E[178]L5[179][178]L8:[139] E [137] 6760
6080 T[178][198]([202](C$(C),L8)):[141] 8010
6090 E[178][168] T0:[139] E [137] 6760
6100 [139] (T[177]47 [175] T[179]58) [176] T[178]46 [167] V0[178][197]([202](C$(C),L8,L5[171]L8)):[137] 6600
6120 [139] T[178]83 [176] T[178]86 [167] V1[178][197]([202](C$(C),L8[170]1,L5[171]L8[171]1))
6125 [139] T[178]83 [167] V0[178]T(V1)[173]100:[137] 6600
6126 [139] T[178]86 [167] [141] 8500:[139] [168] E [137] 6600
6130 E[178]I0:[139] E [137] 6760
6140 I0[178][171]1
6150 [139] T[179][177]78 [137] 6200
6155 [143]: Y FOR YES/NO
6160 I0[178][171]1:I1[178][171]1:[153] I$(C);"(Y/N) ? ";:J[178]35
6170 [161] Y$:[139] Y$[178]"Y" [176] Y$[178]"N" [137] 6180
6175 [153] [199](J);"CMD";:J[178]J[170]1:[139] J[178]40 [167] J[178]35
6176 [137] 6170
6180 [153] Y$:V0[178]0:[139] Y$[178]"Y" [167] V0[178]1
6190 [137] 6600
6195 [143]: I FOR INPUT
6200 C0[178][197]([202](C$(C),L8[170]1,L5[171]L8[171]1)):E[178](C0[179]1 [176] C0[177]4):[139] E [137] 6760
6201 C0[178]C(C0)
6210 [153] I$(C);"? ";
6220 V$[178]"":V0[178]0:I1[178][171]1
6225 [139] V(C)[179][177]0 [167] [141] 7300:[153] V$;
6230 [153] "SPC(CMD";
6240 [161] X$:[139] X$[178]"" [137] 6240
6245 [139] X$[178]"_" [167] [142]
6250 X[178][198](X$):[139] X[178]13 [137] 6400
6260 [139] (X[177]47 [175] X[179]58) [176] X[178]45 [176] X[178]46 [167] V$[178]V$[170]X$:[153] X$;
6270 [139] X[178]20 [175] [195](V$)[177]0 [167] [153] " ";X$;X$;:V$[178][200](V$,[195](V$)[171]1)
6280 [139] X[179][177]43 [137] 6230
6290 I1[178]0:[153] X$:[153] [200](S$,[195](I$(C))[170]2);
6300 V0[178]V0[170][197](V$):V$[178]"":[137]6230
6400 [153] " ";X$;:V0[178]V0[170][197](V$)
6590 [143]: PERFORM DYADIC OPERATION
6600 [139] O0[178]43 [167] V[178]V[170]V0
6610 [139] O0[178]45 [167] V[178]V[171]V0
6620 [139] O0[178]42 [167] V[178]V[172]V0
6630 [139] O0[178]47 [167] V[178]V[173]V0
6640 [139] O0[178]37 [167] V[178]V[172]V0[173]100
6650 [139] O0[178]91 [167] [139] V[177]V0 [167] V[178]V0
6660 [139] O0[178]93 [167] [139] V[179]V0 [167] V[178]V0
6670 [139] O0[178]1 [167] V[178][171](V[179]V0)
6680 [139] O0[178]2 [167] V[178][171](V[178]V0)
6690 [139] O0[178]3 [167] V[178][171](V[179][178]V0)
6700 [139] O0[178]4 [167] V[178][171](V[177]V0)
6710 [139] O0[178]5 [167] V[178][171](V[179][177]0)
6720 [139] O0[178]6 [167] V[178][171](V[177][178]0)
6730 [139] O0[178]7 [167] V[178]1
6740 O0[178]O1:L8[178]L5[170]1
6750 [139] L8[179]L9 [137] 6030
6755 [142]
6760 [153] "ERROR ITEM";C;"' ";[202](C$(C),L8,L5[171]L8);" '":[144]
7000 [143]: ECHO LINE
7010 [139] C0[179]0 [137] 7130
7020 [139] I0 [175] I1 [167] [153] "ON";
7030 [152]4,[200](I$(C)[170]S$,26);" ";
7040 [139] C0[179]1 [137] 7120
7050 [129] J[178]1 [164] 4
7060 [139] (C0[175]C(J))[178]0[137] 7100
7070 [139] T3[178]0 [167] T(J)[178]T(J)[170]V(C)
7080 [139] T3[179][177]0 [167] V(C)[178]T(J):T(J)[178]0
7090 [141] 7200:[137] 7110
7100 [139] LL[177]60 [167] [152]4,[200](S$,12);
7110 [130] J
7120 [152]4
7130 [142]
7200 [141] 7400
7210 CR$[178]" ":[139] [200](V$,1)[178]"-" [167] CR$[178]"CR"
7220 D$[178][201](S$[170]D$,6):CM$[178][202](D$,3,1)
7230 [139] CM$[179][177]" " [167] CM$[178]","
7240 [152]4,[200](D$,3);CM$;[202](D$,4);".";C$;CR$;
7250 [142]
7300 [141] 7400:V$[178][200](V$,1)[170]D$:[139]C$[179][177]"00"[167]V$[178]V$[170]".":V$[178]V$[170]C$
7310 [142]
7400 V$[178][196](V(C)):[139] [195](V$)[179]3 [167] V$[178][200](V$,1)[170]"0"[170][201](V$,1)
7410 C$[178][201](V$,2):D$[178][202](V$,2,[195](V$)[171]3)
7420 [139] [195](D$)[177]6 [167] D$[178]"******"
7430 [142]
7800 [143]: DOLLARS LINE
7810 [139] [195](I$(C))[177]1 [167] [152]4,[200](I$(C)[170]S$,26);" ";
7820 [139] [195](I$(C))[179]2 [167] [152]4,[200](S$,26);" ";
7830 L0[178]2
7840 [139] L0[177]L1 [137] 7910
7850 [129] J[178]L0 [164] L1
7860 [139] [198]([202](C$(C),J))[179][177]59 [167] [130] J
7870 L2[178]J:L3[178]L2[171]L0
7880 [139] L2[177]0 [167] [152]4,[201](S$[170][202](C$(C),L0,L3),10);" ";
7890 [139] L2[178]0 [167] [152]4,[200](S$,12);
7900 L0[178]L2[170]1:[139] LL[177]40 [137] 7840
7910 [152]4
7920 [142]
8000 [143]: VALUE TYPES
8010 T0[178](T[177]47 [175] T[179]58) [176] T[178]46 [176] T[178]73 [176] T[178]83 [176] T[178]86 [176] T[178]78:[142]
8020 [143]: OPERATORS AND COMPARISON GROUPS
8025 T2[178]0:T0[178]T[178]37 [176] T[178]42 [176] T[178]43 [176] T[178]45 [176] T[178]47 [176] T[178]91 [176] T[178]93
8030 T1[178]T[178]60 [176] T[178]61 [176] T[178]62
8040 T0[178]T0 [176] T1
8050 [139] [168] T1 [137] 8100
8060 T1[178]T[171]59:[139] T1[178]3 [167] T1[178]4
8070 T2[178]T2 [176] T1
8080 T[178][198]([202](C$(C),J[170]1)):T1[178]T[178]60 [176] T[178]61 [176] T[178]62
8090 [139] T1 [167] J[178]J[170]1:[137] 8060
8100 [139] T2[177]0 [167] T[178]T2
8110 [142]
8500 E[178]I%(V1)[178]0: [139] E [167] [153] "** NO PARAM";V1:[142]
8510 V0[178]V(I%(V1))[173]100
8520 [142]